console.log("aaa");


var URL = "http://101.200.130.104/DotaVideoApi/?r=Youku/GetSokuAllUser&data={q:'travel',pg:1}";

function Http(url,data){
    this.url = url;
    this.data = data;
    this.error = '';
}

Http.prototype.get = function(callback){
    var request = new XMLHttpRequest();
    request.open('GET', this.url);
    request.onreadystatechange = function(){
        if(request.readyState == 4 && request.status == 200){
            callback(request.responseText);
        }

    }
    request.send(null);
}

//function IndexData(){
//    var request = new XMLHttpRequest();
//    request.open('GET', URL);
//    request.onreadystatechange = function(){
//        if(request.readyState == 4 && request.status == 200){
//            var DATA = request.responseText;
//            var Parse = JSON.parse(DATA);
//            var row = Parse.data;
//            var arr = [];
//            for(var i in row)
//            {
//                arr.push(row[i])
//
//            }
//            console.log(arr);
//
//        }
//    }
//    request.send(null);
//}

//IndexData();


var http = new Http(URL,[],'getCallback');
http.get(function(res){
    console.log(res);

});